#include <mockcpp/mockcpp.hpp>
#include <testngpp/testngpp.hpp>
#include <Rectangle.h>

USING_MOCKCPP_NS
USING_TESTNGPP_NS

FIXTURE(Rectangle)
{
	TEST(should be able to calc the rectangle area: 2*3=6)
	{
		Rectangle rectangle(3,2);
		ASSERT_EQ(6, rectangle.calcArea());
	}

	TEST(should be able to calc the rectangle perimeter: (2+7)*2=18)
	{
		Rectangle rectangle(7,2);
		ASSERT_EQ(18, rectangle.calcPerimeter());
	}

	TEST(should be able to set the rectangle length: length = 7)
	{
                Rectangle rectangle(5,4);
		rectangle.setRectangleLength(7);
		ASSERT_EQ(28, rectangle.calcArea());
		ASSERT_EQ(22, rectangle.calcPerimeter());
	}
	
	TEST(should be able to set the rectangle width: width = 7)
	{
                Rectangle rectangle(6,4);
		rectangle.setRectangleWidth(7);
		ASSERT_EQ(42, rectangle.calcArea());
		ASSERT_EQ(26, rectangle.calcPerimeter());
	}
        
};



